﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using MoneyManagerNET.Presentation.ViewModel;

namespace Tests.Presentation.ViewModel
{
    
    
    /// <summary>
    ///This is a test class for ViewModelBaseTest and is intended
    ///to contain all ViewModelBaseTest Unit Tests
    ///</summary>
    [TestClass()]
    public class ViewModelBaseTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for ViewModelBase`1 Constructor
        ///</summary>
        public void ViewModelBaseConstructorTest1Helper<TModel>()
            where TModel : class
        {
            ViewModelBase<TModel> target = new ViewModelBase<TModel>();
            Assert.Inconclusive("TODO: Implement code to verify target");
        }

        [TestMethod()]
        public void ViewModelBaseConstructorTest1()
        {
            ViewModelBaseConstructorTest1Helper<GenericParameterHelper>();
        }

        /// <summary>
        ///A test for LoadValues
        ///</summary>
        public void LoadValuesTestHelper<TModel>()
            where TModel : class
        {
            ViewModelBase<TModel> target = new ViewModelBase<TModel>(); // TODO: Initialize to an appropriate value
            TModel m = null; // TODO: Initialize to an appropriate value
            target.LoadValues(m);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        [TestMethod()]
        public void LoadValuesTest()
        {
            LoadValuesTestHelper<GenericParameterHelper>();
        }

        /// <summary>
        ///A test for PutValues
        ///</summary>
        public void PutValuesTestHelper<TModel>()
            where TModel : class
        {
            ViewModelBase<TModel> target = new ViewModelBase<TModel>(); // TODO: Initialize to an appropriate value
            TModel m = null; // TODO: Initialize to an appropriate value
            TModel expected = null; // TODO: Initialize to an appropriate value
            TModel actual;
            actual = target.PutValues(m);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        [TestMethod()]
        public void PutValuesTest()
        {
            PutValuesTestHelper<GenericParameterHelper>();
        }

        /// <summary>
        ///A test for ModelAs
        ///</summary>
        public void ModelAsTestHelper<TModel>()
            where TModel : class
        {
            ViewModelBase<TModel> target = new ViewModelBase<TModel>(); // TODO: Initialize to an appropriate value
            TModel expected = null; // TODO: Initialize to an appropriate value
            TModel actual;
            target.ModelAs = expected;
            actual = target.ModelAs;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        [TestMethod()]
        public void ModelAsTest()
        {
            ModelAsTestHelper<GenericParameterHelper>();
        }

        /// <summary>
        ///A test for ViewModelBase Constructor
        ///</summary>
        [TestMethod()]
        public void ViewModelBaseConstructorTest()
        {
            ViewModelBase target = new ViewModelBase();
            Assert.Inconclusive("TODO: Implement code to verify target");
        }

        /// <summary>
        ///A test for Model
        ///</summary>
        [TestMethod()]
        public void ModelTest()
        {
            ViewModelBase target = new ViewModelBase(); // TODO: Initialize to an appropriate value
            object expected = null; // TODO: Initialize to an appropriate value
            object actual;
            target.Model = expected;
            actual = target.Model;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
    }
}
